package com.ssy.lingxi.sms.api.hystrix;

import com.ssy.lingxi.common.exception.BusinessException;
import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.sms.api.entity.SmsSendMsg;
import com.ssy.lingxi.sms.api.feign.ISendSmsFeign;
import com.ssy.lingxi.sms.api.model.SmsVO;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.validation.Valid;
import java.util.List;

/**
 * 短信服务器配置熔断服务实现类
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/6/15
 */
@Component
@Qualifier("sendSmsHystrix")
public class SendSmsHystrix implements ISendSmsFeign {

    @Override
    public Wrapper<List<SmsSendMsg>> sendSms(@Valid SmsVO smsVO) {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

}
